const esbuild = await import('esbuild')

let result

let js = 'a ?? b; a?.b;'

result = esbuild.transformSync(js, {
    loader: 'js',
    target: 'es2015',
})

console.log(result)

/*
{
    warnings: [],
    code: 'a != null ? a : b;\na == null ? void 0 : a.b;\n',
    map: ''
}
*/
